

//
//  IWWindowSwitch.m
//  SINA
//
//  Created by 王相超 on 16/3/31.
//  Copyright © 2016年 chuanzhi. All rights reserved.
//

#import "IWWindowSwitch.h"
#import "IWAccount.h"
#import "IWAccoutTool.h"
#import "AppDelegate.h"
#import "IWTabBarController.h"
#import "IWOAuthViewController.h"

@implementation IWWindowSwitch

+(void)IWWindowSwitch{
    
    IWAccount *accout = [IWAccoutTool model];
    
    UIWindow *window = ((AppDelegate *)[UIApplication sharedApplication].delegate).window;
    
    if (accout) {
        
        window.rootViewController = [IWTabBarController new];
    }else{
        
        window.rootViewController = [IWOAuthViewController new];
        
    }
}

@end
